<?php

$line1 = $line2 = $line3= '';

?>
<dd class="detail">
    <?php
    $to_add  = '';
    if (!empty($this->listing->area_l2) && !empty($this->listing->area_l2->area_l1)) {
        $area_name = $this->listing->area_l2->area_l1->name;
        $line1 = '<a href="'.Ac_Util::getCrossLink($this->listing->area_l2->area_l1->_id, 'area_l1', $this->listing).'">'.$area_name.'</a>';
        $to_add = ', ';
    }

    if (!empty($this->listing->area_l2)) {
        $distric_name = $this->listing->area_l2->name;
        $line1 .= $to_add . '<a href="'.Ac_Util::getCrossLink($this->listing->area_l2->_id, 'area_l2', $this->listing).'">'.$distric_name.'</a>';
        $to_add = ', ';
    }

    if (!empty($this->listing->street)) {
        $line1 .= $to_add . trim($this->listing->street);
        $to_add = ', ';
    }

    $to_add = '';
 
    if (!empty($this->listing->size)){
        $line3 = $this->t('__1__平方米', null, number_format($this->listing->size));
    }

    echo $line1;
    echo (!empty($line1) && !empty($line3)) ? '<br>' : '';
    echo $line3;
    ?>
</dd>

